﻿@page "/Error"
@using System.Diagnostics

<PageTitle>Error</PageTitle>

<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>

@if (ShowRequestId)
{
    <p>
        <strong>Request ID:</strong> <code>@RequestId</code>


        
    </p>
}

 

@code{
    [CascadingParameter]
    private HttpContext? HttpContext { get; set; }
      private string? RequestId { get; set; }
    private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);

    protected override void OnInitialized(){

    RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
 
    }
        
}
